package cn.wzy.mapper;


import cn.wzy.pojo.Employee;
import cn.wzy.vo.GoPageVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * (Employee)表数据库访问层
 *
 * @author makejava
 * @since 2022-12-08 13:53:14
 */
public interface EmployeeMapper extends BaseMapper<Employee> {


    List<Employee> getEmployeeByDepartmentId(Long id);

    List<Employee> employeePage(@Param("starter") Long starter, @Param("end") Long end, @Param("keyword") String keyword);

    Long getTotal(GoPageVo goPageVo);

    void addEmp(Employee employee);

    void updateEmp(Employee employee);

    void delEmp(Long id);

    void delEmpList(List<Long> ids);

    List<Employee> getAllEmp();

    Employee getEmployeeByUsername(String username);

//    通过用户id查询拥有的权限sn
    List<String> getPermissionSnById(Long id);
//     通过用户id删除员工角色
    void delEmpRole(Long id);

    void addEmpRole(@Param("empId") Long empId, @Param("roleIds") List<Long> roleIds);

    List<String> getEmpRoleSnsById(Long id);

    List<Long> getEmpRoleIdsBySns(List<String> roleSns);
}

